package com.nkym.wypan.utils;/*
 * @ClassName UserContextHolder
 * @Desc TODO
 * @Author 19637
 * @Date 2023/6/8 14:38
 * @Version 1.0
 */

import lombok.Data;

@Data
public class UserContextHolder {

    private static final ThreadLocal<Long> userLocal = new ThreadLocal<>();


    public static void setId(Long id) {
        userLocal.set(id);
    }

    public static Long getId() {
        return userLocal.get();
    }


}
